﻿
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestSign
{
    class Program
    {
        static void Main(string[] args)
        {
            

            JObject jsonObject = new JObject();
            jsonObject.Add("expect_pay_way", 3);
            jsonObject.Add("store_id", 845484);
            jsonObject.Add("third_order_id", 1468463865);

            JArray list = new JArray();
            list.Add(JToken.Parse(JsonConvert.SerializeObject(new Item { ssu_id = 228, num = 3000 })));
            list.Add(JToken.Parse(JsonConvert.SerializeObject(new Item { ssu_id = 88, num = 200 })));

            jsonObject.Add("item", list);
            jsonObject.Add("partner_id", "partnerId1");

            JArray list2 = new JArray();
            list2.Add(88);
            list2.Add(299);
            list2.Add(100);
            jsonObject.Add("item2", list2);

            String sign = JsonUtil.gen(jsonObject, "SODEXO_SECRET");
            Console.WriteLine("sign:" + sign);

            
        }

       
    }
}

